package com.yzh.design.demo;

import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class XiaoEr {
    private Logger logger = LoggerFactory.getLogger(XiaoEr.class);

    private Map<Integer, String> cuisineMap = new ConcurrentHashMap<Integer, String>();
    public void order(int cuisine) {
        if (cuisine == 1) {
            cuisineMap.put(cuisine, "粤菜");
        }
        if (cuisine == 2) {
            cuisineMap.put(cuisine, "苏菜");
        }
        if (cuisine == 3) {
            cuisineMap.put(cuisine, "鲁菜");
        }
        if (cuisine == 4) {
            cuisineMap.put(cuisine, "川菜");
        }
    }
    public void placeOrder() {
        logger.info("菜单：{}", JSON.toJSONString(cuisineMap));
    }
}
